<div class="left">
    <h1>Slike</h1>

    <table class="tablesorter" id="carviews" cellpadding="0" cellspacing="0" width="300px" style="margin-bottom: 23px;">

        <thead>
            <tr>
                <th width="85" style="text-align: center;">Photo</th>
                <th width="220" style="text-align: center;">Action</th>
            </tr>
        </thead>

        <tbody>
            <? foreach($images as $img): ?>
                <tr>
                    <td style="text-align: center;">
                        <img src="<?=base_url()?>assets/img/excursions/<?=$img['url']?>.jpg" style="padding: 1px; border: 1px solid #f1f1f1; width: 82px;" />
                    </td>

                    <td style="text-align: center; padding-top: 4px;" class="actiontd">

                        <a href="<?=site_url()?>image/delete_excimg/<?=$img['id']?>/<?=$excursion['id']?>">Briši</a>

                    </td>
                </tr>
                <? endforeach;  ?>
        </tbody>
    </table>
</div>
<div class="left">
    <h1>Dodaj novu sliku za izlet (JPG - 200 x 144px)</h1>
    <div class="lineinput">
        Izlet: <?=$excursion['title']?>
    </div>  
    <?if(isset($submit)):?>
        <div id="infomessage"  style="display: block"><?=$response['message']?></div>
        <?endif;?>
    <form method='post' enctype='multipart/form-data' action='<?=site_url()?>image/submit_addnew'>
        <div class="lineinput">
            <input type="file" name="newpic" id="file" />
        </div>
        <div>
            <input type="hidden" value="<?=$excursion['id']?>" name="excursion_id" />
            <input class="greenbtn" value="Upload" type="submit" />
        </div>
    </form>
</div>